package com.threegroup.web.controller;

import com.threegroup.common.utils.Result;
import com.threegroup.web.pojo.CategoryEntity;
import com.threegroup.web.service.CategoryForGuestService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("mp/category")
public class CategoryForGuestController {

    @Resource
    private CategoryForGuestService categoryForGuestService;


    /**
     * redis查categoryList
     * @return
     */
    @GetMapping("list")
    public Result<List<CategoryEntity>> getCategoryList(){

        Result<List<CategoryEntity>> categoryList = categoryForGuestService.getCategoryList();
        return  categoryList;
    }

}
